<?php

namespace app\admin\model\manufacturing;

use think\Model;

/**
 * Workcentres
 */
class Workcentres extends Model
{
    // 表主键
    protected $pk = 'code';
    
    // 表名
    protected $name = 'manufacturing_workcentres';

    // 自动写入时间戳字段
    protected $autoWriteTimestamp = false;


    public function locationTable(): \think\model\relation\BelongsTo
    {
        return $this->belongsTo(\app\admin\model\stock\Locations::class, 'location', 'loccode');
    }

    public function overheadrecoveryactTable(): \think\model\relation\BelongsTo
    {
        return $this->belongsTo(\app\admin\model\fm\Chartmaster::class, 'overheadrecoveryact', 'accountcode');
    }
}